package com.service;

import com.pojo.TbProducts;
import com.util.JSONResult;
import org.springframework.web.multipart.MultipartFile;

import java.text.ParseException;

public interface ProductsService {

    JSONResult findAllProduct(int page, int limit);

    JSONResult findAllProductByTime(int page, int limit, String starttime, String endtime) throws ParseException;

    JSONResult addProduct(TbProducts products);

    JSONResult deleteProduct(int pid);

    JSONResult updateProduct(TbProducts products);

    JSONResult findProductById(int pid);

    JSONResult updateState(int pid,int state);

    JSONResult upload(MultipartFile file);

    JSONResult findProductByAttention(int page, int limit, int attention);

    JSONResult updateAttention(int pid, int attention);

    JSONResult findAllProductByCode(int page, int limit, String code);
}
